package newcoder.lx_提取不重复的整数;

import java.util.Scanner;

/**
 * @Author Mr.wang
 * @Description 输入一个int型整数，按照从右向左的阅读顺序，返回一个不含重复数字的新的整数。
 * @Date 2020-04-11
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            String line = scanner.nextLine();
            StringBuilder newLine = new StringBuilder();
            for (int i = line.length() - 1; i >= 0; i--) {
                char at = line.charAt(i);
                if (newLine.indexOf(at + "") < 0) {
                    newLine.append(at);
                }
            }
            System.out.println(newLine.toString());
        }
    }
}
